/**
 * 
 */
package com.sci.web.action.datareportseason;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Enterprise_Reward;
import com.sci.web.dao.DataReportM_RewardDao;

/**
 * @author  BaiFuyou
 * @date: Nov 5, 2011 5:49:19 PM
 * 
 * 更新企业奖励数据
 */
public class UpdateEnterpriseRewardData_BaseInfoAction extends BaseAction {

	/**
	 * sid : sid,
					eid : eid,
					reward_type : reward_type,
					reward_name : reward_name,
					reward_date : reward_date
	 */
	private static final long serialVersionUID = 6432710900403803178L;
	@Resource
	private DataReportM_RewardDao dataReportM_RewardDao;
	private int sid;
	private int eid;
	private int reward_type;
	private String reward_name;
	private String reward_date;
	/**
	 * @return the sid
	 */
	public int getSid() {
		return sid;
	}
	/**
	 * @param sid the sid to set
	 */
	public void setSid(int sid) {
		this.sid = sid;
	}
	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}
	/**
	 * @param eid the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}
	/**
	 * @return the reward_type
	 */
	public int getReward_type() {
		return reward_type;
	}
	/**
	 * @param reward_type the reward_type to set
	 */
	public void setReward_type(int reward_type) {
		this.reward_type = reward_type;
	}
	/**
	 * @return the reward_name
	 */
	public String getReward_name() {
		return reward_name;
	}
	/**
	 * @param reward_name the reward_name to set
	 */
	public void setReward_name(String reward_name) {
		this.reward_name = reward_name;
	}
	/**
	 * @return the reward_date
	 */
	public String getReward_date() {
		return reward_date;
	}
	/**
	 * @param reward_date the reward_date to set
	 */
	public void setReward_date(String reward_date) {
		this.reward_date = reward_date;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		Enterprise_Reward er = new Enterprise_Reward();
		er.setEnterprise_id(eid);
		er.setReward_id(sid);
		er.setReward_date(reward_date);
		er.setReward_name(reward_name);
		er.setReward_type(reward_type);
		if(dataReportM_RewardDao.updateEnterpriseReward(er)){
			super.outPrint("ok");
		}else{
			super.outPrint("fail");
		}
		return "json";
	}

}
